package cn.itsource.ymcc.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserDetailsDto  {

    private Long userId ;
    private String username;
    private Collection<? extends GrantedAuthority> authorities;

    //  public User(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
    public UserDetailsDto(String username,Long userId,Collection<? extends GrantedAuthority> authorities) {

        this.username = username;
        this.userId = userId;
        this.authorities = authorities;
    }
}
